{"ast":null,"code":"function _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n    _typeof = function _typeof(obj) {\n      return typeof obj;\n    };\n  } else {\n    _typeof = function _typeof(obj) {\n      return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n    };\n  }\n  return _typeof(obj);\n}\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name formatISODuration\n * @category Common Helpers\n * @summary Format a duration object according as ISO 8601 duration string\n *\n * @description\n * Format a duration object according to the ISO 8601 duration standard (https://www.digi.com/resources/documentation/digidocs/90001437-13/reference/r_iso_8601_duration_format.htm)\n *\n * @param {Duration} duration - the duration to format\n *\n * @returns {String} The ISO 8601 duration string\n * @throws {TypeError} Requires 1 argument\n * @throws {Error} Argument must be an object\n *\n * @example\n * // Format the given duration as ISO 8601 string\n * const result = formatISODuration({\n *   years: 39,\n *   months: 2,\n *   days: 20,\n *   hours: 7,\n *   minutes: 5,\n *   seconds: 0\n * })\n * //=> 'P39Y2M20DT0H0M0S'\n */\n\nexport default function formatISODuration(duration) {\n  requiredArgs(1, arguments);\n  if (_typeof(duration) !== 'object') throw new Error('Duration must be an object');\n  var _duration$years = duration.years,\n    years = _duration$years === void 0 ? 0 : _duration$years,\n    _duration$months = duration.months,\n    months = _duration$months === void 0 ? 0 : _duration$months,\n    _duration$days = duration.days,\n    days = _duration$days === void 0 ? 0 : _duration$days,\n    _duration$hours = duration.hours,\n    hours = _duration$hours === void 0 ? 0 : _duration$hours,\n    _duration$minutes = duration.minutes,\n    minutes = _duration$minutes === void 0 ? 0 : _duration$minutes,\n    _duration$seconds = duration.seconds,\n    seconds = _duration$seconds === void 0 ? 0 : _duration$seconds;\n  return \"P\".concat(years, \"Y\").concat(months, \"M\").concat(days, \"DT\").concat(hours, \"H\").concat(minutes, \"M\").concat(seconds, \"S\");\n}","map":{"version":3,"names":["_typeof","obj","Symbol","iterator","constructor","prototype","requiredArgs","formatISODuration","duration","arguments","Error","_duration$years","years","_duration$months","months","_duration$days","days","_duration$hours","hours","_duration$minutes","minutes","_duration$seconds","seconds","concat"],"sources":["/data/messenger.client/node_modules/date-fns/esm/formatISODuration/index.js"],"sourcesContent":["function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name formatISODuration\n * @category Common Helpers\n * @summary Format a duration object according as ISO 8601 duration string\n *\n * @description\n * Format a duration object according to the ISO 8601 duration standard (https://www.digi.com/resources/documentation/digidocs/90001437-13/reference/r_iso_8601_duration_format.htm)\n *\n * @param {Duration} duration - the duration to format\n *\n * @returns {String} The ISO 8601 duration string\n * @throws {TypeError} Requires 1 argument\n * @throws {Error} Argument must be an object\n *\n * @example\n * // Format the given duration as ISO 8601 string\n * const result = formatISODuration({\n *   years: 39,\n *   months: 2,\n *   days: 20,\n *   hours: 7,\n *   minutes: 5,\n *   seconds: 0\n * })\n * //=> 'P39Y2M20DT0H0M0S'\n */\n\nexport default function formatISODuration(duration) {\n  requiredArgs(1, arguments);\n  if (_typeof(duration) !== 'object') throw new Error('Duration must be an object');\n  var _duration$years = duration.years,\n      years = _duration$years === void 0 ? 0 : _duration$years,\n      _duration$months = duration.months,\n      months = _duration$months === void 0 ? 0 : _duration$months,\n      _duration$days = duration.days,\n      days = _duration$days === void 0 ? 0 : _duration$days,\n      _duration$hours = duration.hours,\n      hours = _duration$hours === void 0 ? 0 : _duration$hours,\n      _duration$minutes = duration.minutes,\n      minutes = _duration$minutes === void 0 ? 0 : _duration$minutes,\n      _duration$seconds = duration.seconds,\n      seconds = _duration$seconds === void 0 ? 0 : _duration$seconds;\n  return \"P\".concat(years, \"Y\").concat(months, \"M\").concat(days, \"DT\").concat(hours, \"H\").concat(minutes, \"M\").concat(seconds, \"S\");\n}"],"mappings":"AAAA,SAASA,OAAO,CAACC,GAAG,EAAE;EAAE,yBAAyB;;EAAE,IAAI,OAAOC,MAAM,KAAK,UAAU,IAAI,OAAOA,MAAM,CAACC,QAAQ,KAAK,QAAQ,EAAE;IAAEH,OAAO,GAAG,SAASA,OAAO,CAACC,GAAG,EAAE;MAAE,OAAO,OAAOA,GAAG;IAAE,CAAC;EAAE,CAAC,MAAM;IAAED,OAAO,GAAG,SAASA,OAAO,CAACC,GAAG,EAAE;MAAE,OAAOA,GAAG,IAAI,OAAOC,MAAM,KAAK,UAAU,IAAID,GAAG,CAACG,WAAW,KAAKF,MAAM,IAAID,GAAG,KAAKC,MAAM,CAACG,SAAS,GAAG,QAAQ,GAAG,OAAOJ,GAAG;IAAE,CAAC;EAAE;EAAE,OAAOD,OAAO,CAACC,GAAG,CAAC;AAAE;AAEzX,OAAOK,YAAY,MAAM,+BAA+B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,SAASC,iBAAiB,CAACC,QAAQ,EAAE;EAClDF,YAAY,CAAC,CAAC,EAAEG,SAAS,CAAC;EAC1B,IAAIT,OAAO,CAACQ,QAAQ,CAAC,KAAK,QAAQ,EAAE,MAAM,IAAIE,KAAK,CAAC,4BAA4B,CAAC;EACjF,IAAIC,eAAe,GAAGH,QAAQ,CAACI,KAAK;IAChCA,KAAK,GAAGD,eAAe,KAAK,KAAK,CAAC,GAAG,CAAC,GAAGA,eAAe;IACxDE,gBAAgB,GAAGL,QAAQ,CAACM,MAAM;IAClCA,MAAM,GAAGD,gBAAgB,KAAK,KAAK,CAAC,GAAG,CAAC,GAAGA,gBAAgB;IAC3DE,c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